package com.itheima.baozhuang;

import java.util.Scanner;

public class TestStudent {
    public static void main(String[] args) {

        Student s = getStudent();
        System.out.println(s.toString());

    }

    private static Student getStudent() {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入姓名");
        String name = sc.next();
        System.out.println("请输入年龄");
        String age = sc.next();
        System.out.println("请输入身高");
        String height = sc.next();
        System.out.println("请输入婚否");
        String wedding = sc.next();
        System.out.println("请输入性别");
        String sex = sc.next();
        int age1 = Integer.parseInt(age);
        double height1 = Double.parseDouble(height);
        boolean wedding1 = Boolean.parseBoolean(wedding);
        char sex1 = sex.charAt(0);
        Student student=new Student(name,age1,height1,wedding1,sex1);
        return student;
    }
}
